﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Frame.master" AutoEventWireup="true" CodeFile="shift.aspx.cs" Inherits="shift" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleHolder" Runat="Server">
    Thiết lập ca trực
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" Runat="Server">
<script type="text/javascript">

    

  
</script>
<div class="errorMsg2" id="errorMsg" style="display:none;margin-left:210px;text-indent:10px;"></div>
    <table border="0" cellspacing="0" cellpadding="0" class="margin_l150">
        <tr>
            <td align="left">
                <asp:Label ID="lblMsg" runat="server" ForeColor="#FF3300"></asp:Label>
                <asp:Repeater ID="rptShift" runat="server" EnableViewState="false" OnItemDataBound="rptShift_ItemDataBound">
                    <HeaderTemplate>
                      <table width="800" cellpadding="5">
                        <tr>
                            <td align="left" valign="top" width="100"><b>Ca làm việc</b></td>
                            <td align="left" valign="top" style="padding-left:20px"><b>Thời gian</b></td>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td align="left" valign="top"><asp:CheckBox  Checked="true" ID="chkShift" runat="server" Text='<%#Eval("Name") %>'/></td>
                            <td align="left" valign="top">
                                Từ <asp:TextBox MaxLength="5"  CssClass="width_100" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"FromTime","{0:HH:mm}") %>' ID="txtFrom"></asp:TextBox>
                                đến <asp:TextBox MaxLength="5" CssClass="width_100" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"ToTime","{0:HH:mm}") %>' ID="txtTo"></asp:TextBox>
                                
                                <asp:HiddenField ID="hdnActive" runat="server" Value='<%#Eval("Active") %>' />
                                <asp:HiddenField ID="hdnId" runat="server" Value='<%#Eval("Id") %>' />
                             </td>
                        </tr>
                        
                    </ItemTemplate>
                    <FooterTemplate>
                       
                    </table>
                    </FooterTemplate>
                </asp:Repeater>
                <table width="800">
                     <tr>
                            <td align="left" width="110" valign="top">
                                &nbsp;
                            </td>
                            <td align="left" valign="top" style="padding: 10px 0 0 22px">
                                <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/images/luu.gif" 
                                    onclick="btnSave_Click" OnClientClick="return ValidationShift()"/>
                                <asp:ImageButton ID="btnReset" runat="server" ImageUrl="~/images/xoa.gif" />
                            </td>
                        </tr>
                </table>
            </td>
            </tr>
    </table>
</asp:Content>

